package org.linuxsogood.boot.test;

import org.junit.Test;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
 * @author honway.liu
 * @date 2016/11/27 下午6:03
 * @email gm100861@gmail.com
 * @blog http://linuxsogood.org
 */
public class Misc {

    private static Map<Integer, Integer> map = new HashMap<>();
    public static void main(String[] args) throws InterruptedException {


        new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                map.put(i, i);
            }
        }).start();
        new Thread(() -> {
            for (int i = 100; i < 200; i++) {
                map.put(i, i);
            }
        }).start();

        TimeUnit.SECONDS.sleep(1);
        map.forEach((k, v) -> {
            if (!k.equals(v)) {
                System.out.println("k = " + k + ", v = " + v);
            }
        });
    }


    @Test
    public void m() {
        System.out.println("bbb");
    }


    @Test
    public void m2() {
        System.out.println("岁");
    }
}
